package net.luohuasheng.bee.proxy.mybatis.executor.processor;

import org.apache.ibatis.mapping.BoundSql;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.mapping.SqlSource;
import org.apache.ibatis.plugin.Invocation;
import org.apache.ibatis.session.Configuration;

public class GetValueProcessor extends BaseProcessor {

    public GetValueProcessor(Configuration configuration, Class<?> entityClass) {
        super(configuration, entityClass);
    }

    @Override
    public void rewrite(Invocation invocation, MappedStatement ms, BoundSql boundSql, Object parameter) {

    }

    @Override
    public SqlSource createSqlSource() {
        return createSqlSource("select ${fieldName} from " + jpaTableDto.getName()+ " " + addLogicConditions(jpaTableDto.getColumns()));
    }

}
